home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Greatest Childrens Stories Ever Told
/
Greatest_Stories.iso
/
demos
/
funtown
/
demo.dir
/
00047_Script_Scripts 2
< prev
next >
Wrap
Text File
|
1994-11-08
|
10KB
|
328 lines
--òòò Scripts 2
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on checkClickLoc clickH, clickV, clickSprite
global mode, MS, H, V, CIU, MIU, NM, M, CU
global CV
if CU then exit
if not ( CIU ) then pointerCursor
if (clickV<the top of sprite ( 35 )) then
if CIU then restoreChalk
if MIU then disengageMap
exit
end if
if MIU then
if not ( rollOver ( 47 )) or M=the movie then disengageMap
else go movie ( M )
end if
dontPassEvent
if (clickH>385) then
restoreChalk
end if
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doArrow whichArrow
global CV, WT, CU, MIU
if CU then exit
if CV="0" then
beep
exit
end if
if CV="c" then set whereToGeneral = item 9 of WT
else set whereToGeneral = item value(CV) of WT
set whereToSpecific = char whichArrow of whereToGeneral
if whereToSpecific="0" then
if MIU then activate 48,the number of cast ("Red Arrow "& whichArrow),1,36,433,316,"","",""
else activate 47,the number of cast ("Red Arrow "& whichArrow),1,36,433,316,"","",""
updateStage
beep
else
if MIU then activate 48,the number of cast ("Green Arrow "& whichArrow),1,36,433,316,"","",""
else activate 47,the number of cast ("Green Arrow "& whichArrow),1,36,433,316,"","",""
updateStage
set CV=whereToSpecific
reposition (CV)
end if
startTimer
repeat while the timer<3 or the mouseDown
do ( "nothing" )
end repeat
deactivate string ( 47 ) -- no need to store/restore, as channels 46-48 should be left empty in the score.
updateStage
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doBell
global CV, H, V, CIU, MIU, EB, CU, MIU
if CU then exit
set CU = true
if MIU then set floatingSprite = 48
else set floatingSprite = 47
store string ( floatingSprite )
activate floatingSprite,the number of cast "exit bell 1",1,0,486,296,"","",""
Sound PlayFile 1, "School.Bel"
updateStage
repeat while the soundBusy of 1
set the castNum of sprite floatingSprite=the number of cast "exit bell 2"
updateStage
set the castNum of sprite floatingSprite=the number of cast "exit bell 1"
updateStage
end repeat
deactivate string ( floatingSprite )
updateStage
set EB = 1
doWindow
end
--¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
on doHelp
global CU
if CU then exit
store string ( 47 )
activate 47,the number of cast "!",1,0,497,316,"","",""
Sound playFile 1, "Help"
updateStage
restore string ( 47 )
updateStage
if the frame >= label ( "map" ) and the frame <= (label ( "map" ) + 6) then disengageMap
--alert "The help feature has been disabled"&Return&"for this demo."
doWindow2
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doHelp2
global JOS
if voidP ( JOS ) then set JOS=random ( 2 ) -1
else set JOS=not ( JOS )
if JOS=0 then set whichHelpScreen="Jimmy Help"
else set whichHelpScreen="Sally Help"
play movie "Around the Town:Help Screens:"& whichHelpScreen
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doHome
global CV, H, V, CIU, MIU, mode, TMD, TF, AM, CU
if CU then exit
activate 42,the number of cast "home",1,0,496,350,"","",""
updateStage
if MIU then disengageMap
else initializeMap
activate 42,"TransparentQDBox",1,37,480,332,"stretch to:",508,367
updateStage
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doApple
global CIU, CU
if CU then exit
if CIU=0 then doChalk
else if CIU=1 then ChalkPalette
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doChalk
global WC, MS, CU
if CU then exit
puppetSprite ( 38 ), true
if the type of sprite ( 38 )>0 then
if the name of cast ( the castNum of sprite ( 38 ))="Chalk" then
activate 38,the number of cast ("Chalk dust "&WC),1,8,-10,-10,"","",""
updateStage
set the trails of sprite ( 38 )=true
end if
end if
chalkCursor
repeat while the stillDown
set userH=the mouseH
set userV=the mouseV
if (userH>12) then
if (userH<369) then
if (userV>273) then
if (userV<354) then
if not ((userH>316) and (userV>348)) then
if not ((userH<30) and (userV>339)) then
if the optionDown then set the blend of sprite ( 38 )=100
else if the locV of sprite ( 38 ) >0 then
set chalkH=the locH of sprite ( 38 )
set chalkV=the locV of sprite ( 38 )
set chalkDrag=random ( 5 ) +5
set chalkBlend=40/chalkDrag
repeat with x=1 to chalkDrag
set the blend of sprite ( 38 )=( chalkDrag+1-x )*chalkBlend
set the locH of sprite ( 38 )=(userH-(userH-chalkH)/x)
set the locV of sprite ( 38 )=(userV-(userV-chalkV)/x)
updateStage
end repeat
end if
set the locH of sprite ( 38 )=userH
set the locV of sprite ( 38 )=userV
updateStage
end if
end if
end if
end if
end if
end if
end repeat
set the locV of sprite ( 38 )=-5000
updateStage
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doEraser
global CIU, MS, CU
if CU then exit
puppetSprite ( 45 ), true
deactivate string ( 47 )
-- restoreChalk
handCursor
repeat while the stillDown
if (the mouseH>32) then
if (the mouseH<348) then
if (the mouseV>279) then
if (the mouseV<353) then
set the locH of sprite ( 45 )=the mouseH
set the locV of sprite ( 45 )=the mouseV
updateStage
end if
end if
end if
end if
end repeat
restoreCursor
set eraserH=the locH of sprite ( 45 )
set eraserV=the locV of sprite ( 45 )
repeat with x=1 to 5
set the locH of sprite ( 45 )=(342-(342-eraserH)/x)
set the locV of sprite ( 45 )=(362-(362-eraserV)/x)
updateStage
end repeat
set the locH of sprite ( 45 )=(342)
set the locV of sprite ( 45 )=(362)
updateStage
if CIU then chalkCursor
else restoreChalk
restore string ( 47 )
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on restoreChalk dontPass
if ( the commandDown ) then exit
global CIU, MS
if CIU then
if MS="PictureDictionary" then activate 38,the number of cast "Chalk",1,8,21,339,"","",""
else activate 38,the number of cast "Chalk",1,8,10,370,"","",""
set the trails of sprite ( 38 )=false
puppetSprite 38, false
go the frame
end if
restoreCursor
updateStage
if dontPass>0 then dontPassEvent
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on changeChalkColor
global WC, CIU
if not ( CIU ) then exit
if WC>=9000 and WC<9006 then set WC=WC+1
else set WC=9000
set the castNum of sprite ( 38 )=the number of cast ("Chalk dust "&WC)
updateStage
chalkCursor
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on chalkCursor
global colorcrsr, WC, CIU
--if not objectP(colorcrsr) then set colorcrsr = colorcursor(mNew)
-- colorcrsr(mGetSetCursor, (WC))
set WC to [61]
cursor[61,62]
set CIU=1
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on handCursor
global colorcrsr, WC, HIU
--set whichHand=9006+random(2)+(random(20)=20)
--if not objectP(colorcrsr) then set colorcrsr = colorcursor(mNew)
--colorcrsr(mGetSetCursor, (whichHand))
set whichHand to [63]
cursor[63,64]
set HIU=1
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on pointerCursor
global colorcrsr, WC, PIU
--set whichHand=9009+random(2)
--if not objectP(colorcrsr) then set colorcrsr = colorcursor(mNew)
--colorcrsr(mGetSetCursor, (whichHand))
--set whichHand to [63]
--cursor[63,64]
cursor -1
set PIU=1
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on restoreCursor
global colorcrsr, CIU
set CIU=0
if not objectP(colorcrsr) then exit
pointerCursor
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on restoreCursor2
global colorcrsr, CIU
set CIU=0
if not objectP(colorcrsr) then exit
colorcrsr(mReleaseCursor)
colorcrsr(mDispose)
cursor 0
cursor 4
cursor -1
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on doSound whichSound
Sound PlayFile 1, whichSound
updateStage
repeat while the soundBusy of 1
updateStage
end repeat
updateStage
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on chalkPalette
global CCC, WC
activate 47,"PaintColors1",1,0,27,355,"","",""
activate 48,"PaintSelector",1,36,31,359,"","",""
updateStage
set leftSide=the left of sprite 47
set topSide=the top of sprite 47
repeat while the stillDown
set selectorH=( the mouseH-leftSide ) / 6
set selectorV=( the mouseV-topSide ) / 6
if selectorH<0 then set selectorH=0
if selectorH>63 then set selectorH=63
if selectorV<0 then set selectorV=0
if selectorV> 3 then set selectorV=3
set the locH of sprite 48=leftSide+selectorH*6+4
set the locV of sprite 48=topSide+selectorV*6+4
updateStage
end repeat
set whichChalkColor=selectorH +( selectorV*64 )
activate 38,the number of cast ("chalk dust userDefined"),1,8,-10,-10,"","",""
set the foreColor of sprite ( 38 )=whichChalkColor
updateStage
set the trails of sprite ( 38 )=true
set WC=9000
chalkCursor
delayFor 10
repeat with x=1 to 2
set the ink of sprite 48=37
updateStage
delayFor 10
set the ink of sprite 48=36
updateStage
delayFor 10
end repeat
deactivate string ( 47 )
deactivate string ( 48 )
CorrectInterFace
updateStage
end
--ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
on delayFor howLong
startTimer
repeat while the timer<howLong
do ( "nothing" )
end repeat
end